This code shows how to use the SGDrawable class to display video within a QTCanvas. It also shows how to use the Sequence Grabber to capture a the incoming video to a movie file.
Microsoft Windows Caveats: Has not been tested under windows due to a lack of Video in boards that support Quick Time 3.0
Note: You need to set the client in the WindowOpened method for the Sequence grabber as the QDGraphics needs to be visible when it is set. (Quick Time requirement).
You do not need to create a moviefile to save the recorded data as the sequence grabber will automatically create a movie file for you based on the file you set in the setDataOutput method.
A QTSession.open will perform a gestalt check to ensure that QuickTime is present and is initialized. This is a required call before any QuickTime Java classes can be used.
When the user closes the window the program will quit, first calling QTSession.close to terminate QuickTime. It is necessary for programs to call QTSession.close if they have previously called QTSession.open in order to shut down QuickTime properly.